<?php

namespace IDock\Insurance\DBIC\Response;

use IDock\Http\Response;
use IDock\Printer\ProposalRecallPrinter;

class ProposalRecallResponse extends AllDBICResponse
{
    /**
     * @var ProposalRecallPrinter $printer
     */
    public $printer = ProposalRecallPrinter::class;

    public function printerInit(): Response
    {
        $opsResult = $this->getRecords(0)['opsResult'] ?? false;

        $this->printer->isSuccess = $opsResult == true;
        return $this;
    }
}